package com.superjson.showpro.entity;

import com.superjson.showpro.base.BaseObj;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Created By zby on 20:38 2019/5/28
 * 文章和用户关联类，一篇文章被用户看了多少次
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@Entity
@Table(name = "sp_article_catalog_user")
public class ArticleCatalogUser extends BaseObj implements Serializable{


    private static final long serialVersionUID = 3961825007276748501L;
    /**
     * 文章目录
     */
    @ManyToOne
    @JoinColumn(name = "article_catalog_id")
    private ArticleCatalog articleCatalog;

    /**
     * 用户
     */
    @ManyToOne
    @JoinColumn(name = "user_id")
    private User user;

}